<?php

App::uses('AppController', 'Controller');
App::uses('Data', 'Model');

class AdministracijaController extends AppController {
    
    public $uses = array('Data');
    
    public function firma() {
        
        if ($this->data) {
            $data = $this->data['Data'];
            
            if ($this->Data->saveAll($data)) {
               $this->setFlash('Podaci su sačuvani.', 'ok'); 
            }else{
               $this->setFlash('Podaci nisu sačuvani.', 'ok');
            }
        }
        
        $data = $this->Data->getCompanyData();
        $this->set(compact('data'));
    }
    
}

?>